home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
MCASM.RAR
/
MC_ASM.EXE
/
WROX_ASM
/
CH12
/
COMMON
/
CONFIGS.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-06-21
|
435b
|
25 lines
#include <string.h>
#include <stdio.h>
#include "common.h"
char *next_string(FILE *f){
static char s[120];
char *s1;
int i;
do {
if feof(f) return("");
fgets(s, 120, f);
}
while(s[0] == ';'); //skip comment strings
s1 = strchr(s,';');
if (s1 == NULL) i = strlen(s) -1;
else i = s1-s;
//kill comment and spaces
while (((s[i]==' ') || (s[i]=='\t')) && (i-- > 0)) s[i] = '\x0';
return(s);
}